home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
comm
/
tcp
/
clchat40.lha
/
CLChat40
/
CLChat_Install
next >
Wrap
Text File
|
1995-05-04
|
8KB
|
243 lines
; CLChat Installer Robert Reiswig (rcr@netcom.com) ©1995
; For Oliver Wagner
; My Not be use in anyother release cept Aminet.. With out my asking.
;
;********************************************************************
; Current Version of CLChat
;********************************************************************
(set CLChatVer "4.0")
(set Client 0) ; For doing ONLY Server install for docs
;********************************************************************
; Info on CLChat & Installer Man
;********************************************************************
(message "\nCLChatSystem V" CLChatVer " for AmiTCP ©1994-1995\nby:\n\n\nOliver Wagner\n\(o.wagner@pluribus.wupper.de)\n\n\n"
"\n\nInstaller by:\nRobert Reiswig (rcr@netcom.com)"
)
;********************************************************************
; MakeSure Amitcp is Installer
;********************************************************************
(set #NeedAmiTCP (cat "CLChat needs AmiTCP to be installed."))
(if (< (exists ("Amitcp:")) 2)
(abort #NeedAmiTCP)
)
;********************************************************************
; Check for First Time install
;********************************************************************
(set there (askchoice (choices "Yes" "No")
(prompt "Is this your first time installing CLChat?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
"If No is selected, then the installer will NOT "
"(re)add entries to 'inetd.conf' & 'services' in the Amitcp:db drawer and 'startnet'.")
(help "Please Select: Updating or First Time Install")
(default 0)
)
)
;********************************************************************
; Ask Client and/or Server
;********************************************************************
(set CS (askoptions (choices "Client" "Server")
(prompt "What parts of CLChat do you wish to install?")
(help "What parts of CLChat do you wish to install?\nNote: You don't need the Server if you want to connect to a existing CLChatServer only.")
(default 63)
)
)
;********************************************************************
; Copy over files for Client
;********************************************************************
(if (IN CS 0)
(
(set Client (askdir (prompt "Please select where you wish to install the CLChat Client. A directory 'CLChat' will be created there!)")
(help "Please select where you wish to install the CLChat Client. A directory 'CLChat' will be created there!)")
(default "Amitcp:")
)
)
(if (< (exists (tackon Client "CLChat")) 2)
(makedir (tackon Client "CLChat") (infos))
)
(copyfiles (source "Client/CLChatGUI") (dest (tackon Client "CLChat")) (infos))
(set extras (askoptions (choices "Client Documentation")
(prompt "Do you wish to copy over any of the following?")
(help "Do you wish to copy over any of the following?")
(default 63)
)
)
(if (<> extras 0)
(
(if (< (exists (tackon Client "CLChat/Docs")) 2)
(makedir (tackon Client "CLChat/Docs") (infos))
)
(set where (tackon Client "CLChat/Docs"))
(if (IN extras 0)
(
(copyfiles (source "Client/CLChatGUI.guide") (dest (tackon Client "CLChat/Docs")) (infos))
(copyfiles (source "Client/CLChatGUI.doc") (dest (tackon Client "CLChat/Docs")) (infos))
(copyfiles (source "Client/ReadMe.mui") (dest (tackon Client "CLChat/Docs")) (infos))
)
)
)
)
)
)
;********************************************************************
; Copy over files for Server
;********************************************************************
(if (IN CS 1)
(
(set cpu (database "cpu"))
(if (= cpu 68000) (set #cpu 0))
(if (= cpu 68010) (set #cpu 1))
(if (= cpu 68020) (set #cpu 2))
(if (= cpu 68030) (set #cpu 3))
(if (= cpu 68040) (set #cpu 4))
(if (= cpu 68060) (set #cpu 5))
(set cpuPick (askchoice (choices "68000" "68010" "68020" "68030"
"68040" "68060"
)
(prompt "Central Processing Unit Check")
(help "Central Processing Unit Check")
(default #cpu)
)
)
(if (< cpu 68030) (copyfiles (source "Server/Bin/CLChatServer") (dest "Amitcp:bin")) )
(if (> cpu 68020) (copyfiles (source "Server/Bin/CLChatServer030") (dest "Amitcp:bin") (newname "CLChatServer") ) )
(copyfiles (source "Server/serv/CLChatD") (dest "Amitcp:serv"))
(copyfiles (source "Server/bin/CLChatLink") (dest "Amitcp:bin"))
(if (= there 0)
(
(set port (asknumber (prompt "Please enter the port you wish\nto have the CLChat server on.\n"
"(5555 is the default.)")
(help "Enter Port")
(default 5555)
)
)
(textfile (dest "t:services.add") (append (cat "clchat " port "/tcp\n")))
(rename "amitcp:db/services" "amitcp:db/services.CLChat.Backup")
(run ("join amitcp:db/services.CLChat.Backup t:services.add to amitcp:db/services"))
(textfile (dest "t:InetD.conf.add") (append "clchat stream tcp nowait root amitcp:serv/clchatd\n"))
(rename "amitcp:db/InetD.conf" "amitcp:db/InetD.conf.CLChat.Backup")
(run ("join amitcp:db/InetD.conf.CLChat.Backup t:InetD.conf.add to amitcp:db/InetD.conf"))
(textfile (dest "t:startnet.add") (append "run >NIL: AmiTCP:bin/CLChatServer\n"))
(rename "amitcp:bin/startnet" "amitcp:bin/startnet.CLChat.Backup")
(run ("join amitcp:bin/startnet.CLChat.Backup t:startnet.add to amitcp:bin/startnet"))
)
)
(set extras (askoptions (choices "Server Documentation" "Sample Bot")
(prompt "Do you wish to copy over any of the following?")
(help "Do you wish to copy over any of the following?")
(default 63)
)
)
(if (<> extras 0)
(
(if (= Client 0) (set Client "Amitcp:"))
(if (< (exists (tackon Client "CLChat")) 2)
(makedir (tackon Client "CLChat") (infos))
)
(if (< (exists (tackon Client "CLChat/Docs")) 2)
(makedir (tackon Client "CLChat/Docs") (infos))
)
(set where (tackon Client "CLChat/Docs"))
(if (IN extras 0)
(copyfiles (source "CLChatServer.DOC") (dest (tackon Client "CLChat/Docs")) (infos))
)
(if (IN extras 1)
(
(if (< (exists (tackon Client "CLChat/SampleBot")) 2)
(makedir (tackon Client "CLChat/SampleBot") (infos))
)
(copyfiles (source "Server/Bot") (dest (tackon Client "CLChat/SampleBot")) (all))
)
)
)
)
)
)
;********************************************************************
; Copy Extraa Demo stuff
;********************************************************************
(set extras (askoptions (choices "Example ChatServer.MOTD" "Example ChatServer.OPList"
"Example ChatServer.Servers" "Example ChatServer.UserBans")
(prompt "Do you wish to copy over any of the following Examples?")
(help "Do you wish to copy over any of the following Examples?")
(default 63)
)
)
(if (IN extras 0) (copyfiles (source "Server/db/ChatServer.MOTD") (dest "Amitcp:db") (infos)) )
(if (IN extras 1) (copyfiles (source "Server/db/ChatServer.OPList") (dest "Amitcp:db") (infos)) )
(if (IN extras 0) (copyfiles (source "Server/db/ChatServer.Servers") (dest "Amitcp:db") (infos)) )
(if (IN extras 1) (copyfiles (source "Server/db/ChatServer.UserBans") (dest "Amitcp:db") (infos)) )
;********************************************************************
; Bye Bye
;********************************************************************
(set @default-dest Client)